import { request } from "@/http/axios"

// 获取轮播图列表
export function getBannersList(data) {
  return request({
    url: "banner/list",
    method: "post",
    data,
    headers: {
      "Content-Type": "multipart/form-data"
    }
  })
}

// 新增轮播图列表
export function addtBannersList(data) {
  return request({
    url: "banner/add",
    method: "post",
    data,
    headers: {
      "Content-Type": "multipart/form-data"
    }
  })
}

// 修改轮播图列表
export function updateBannersList(data) {
  return request({
    url: "banner/update",
    method: "post",
    data,
    headers: {
      "Content-Type": "multipart/form-data"
    }
  })
}

// 修改轮播图列表
export function deleteBannersList(id) {
  return request({
    url: `banner/delete/${id}`,
    method: "post"
  })
}

// 修改轮播图状态
export function updateBannersListStatus(data) {
  return request({
    url: `/banner/update`,
    method: "post",
    data,
    headers: {
      "Content-Type": "multipart/form-data"
    }
  })
}
